import java.util.Scanner;

public class Compare {
   public static void my_Compare(int a,int b){
        if(a>b){
            System.out.println(a);
        }else{
            System.out.println(b);
        }
    }
    public static double my_Compare(double c,double d){
        if(c>d){
            //System.out.println(c);
            return c;
        }else{
            //System.out.println(d);
            return d;
        }
    }
    public static void my_compare(double c,double d,double e){
        double ret=my_Compare(c,d);
        if(ret>e){
            System.out.println(ret);
        }else{
            System.out.println(e);
        }
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int a= scanner.nextInt();
        int b= scanner.nextInt();
        double c=scanner.nextDouble();
        double d=scanner.nextDouble();
        double e=scanner.nextDouble();
        my_Compare(a,b);
        my_compare(c,d,e);
    }
}
